home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
admin
/
accounts
/
acct-1.3
/
acct-1
/
acct-1.3.73
/
README
< prev
Wrap
Text File
|
1996-03-12
|
2KB
|
59 lines
The patches here, in this directory, are for
Linux-1.2.0-Linux-1.3.26, Linux-1.3.61-Linux-1.3.69,
Linux-1.3.70 and Linux-1.3.71-Linux-1.3.72. Process accounting
finally found its way to mainstream kernel in Linux-1.3.73.
If necessary, apply apropriate patch with command like
"patch -p0 < kernel_diffs-1.2.0" in the /usr/src dir. So
1) cd /usr/src
2) patch -p0 < <where_ever_you_put_it>/kernel_diffs-1.2.0
or
2) patch -p0 < <where_ever_you_put_it>/kernel_diffs-1.3.61
Check for rejections and do something to it.
3) find linux -name \*.rej
The ``something'' may very well be obtaining new patch from
iguana.hut.fi.
Patches for other kernels are available as
ftp://iguana.hut.fi/pub/linux/Kernel/Patches/acct_for_1.y.z, where
y and z represent kernel version numbers.
After succesful patching cd to /usr/src/linux and do a "make config;
make dep; make clean; make zImage" (or whatever is your usual kernel
compilation sequence) and that makes a new kernel for you with process
accounting support. When you finished with kernel compilation, install
it. After that go to the utils directory found in the same directory
as this README file. Make the utils and install them.
Now reboot and after that all should be ready for process
accounting coming onto stage.
To start process accounting for the first time do:
"touch /var/log/acct; /usr/local/sbin/accton /var/log/acct".
Add something like "/usr/local/sbin/accton /var/log/acct" to your rc
startup script. And something like "/usr/local/sbin/accton" to the
rc-script that shuts your system down.
Have fun and remember to trim accounting file down at times
as it tends to grow quite rapidly.
For this you may use the handleacct.sh shell script found in
scripts directory. I have following line in iguana.hut.fi's
/etc/crontab file:
# Trim accounting file down hourly and save old files compressed for 97 hours
00 * * * * root /usr/local/sbin/handleacct.sh -c -s 97
(Iguana.hut.fi spawns at least 18000 processes per hour but may
peak as high as 60000 processes per hour.) If your machine is not
as busy as this machine is, you may very well do the trimming
more seldom. For example in my home machine I trim down
accounting file only once a day.
Juha Virtanen
<jiivee@iki.fi>